Statements and Functions > Load

Load

Entity-Related Operation Statement

Syntax samples

LOAD <expression> {PERM}{IFF <Boolean expression>}{IN <time>}{,<priority>}

LOAD 5, 99

LOAD 5 IFF Attr3 > 2 IN 5 min

LOAD Pallet_Capacity

LOAD 5 PERM IN 10 min

Description

Loads a specified quantity of entities onto a base entity. Temporarily loaded entities retain their identity and may be unloaded with an UNLOAD statement. Permanently loaded entities, using the PERM option in the LOAD statement, do not retain their identity and cannot be unloaded later. Loaded entities must be routed to the loading location using the LOAD routing rule. Additional entities may be added to an entity’s existing load with additional LOAD statements. Use LOAD to model parts placed into a container or pallet when they must be removed later. If a base entity owns a resource when the entities are unloaded the resource stays with the base entity. Any resources owned by permanently loading entities are transferred automatically to the base entity. Any resources owned by temporary loading entities are kept and cannot be freed until the entities are unloaded.

Valid In

Operation logic only. A process may contain multiple load statements and no more than one UNLOAD statement following all LOAD statements. LOAD may not be used in the same process with SPLIT AS, CREATE, COMBINE, GROUP, or UNGROUP.

Components

<expression>

The number of entities to load onto the base entity. This expression is evaluated at the time the entity encounters the LOAD request.

PERM

This option causes the LOAD to behave the same as the JOIN statement. It will permanently join entities to the base entity executing the LOAD statement. Any resources owned by the permanently loading entities are transferred automatically to the base entity.

IFF <Boolean expression>

This option allows the LOAD command to be conditional. Any attributes, entity functions, or location functions apply to the entity to be loaded, not to the base entity. This technique allows only entities with certain properties to be loaded onto the base entity. To use attributes, entity functions, and location functions that apply to the base entity, assign the desired value to a local variable and use the local variable in the Boolean expression.

IN <time>

The entity will load entities up to the specified limit for this amount of time and then go on. Entities loaded with this option may have a load smaller than the specified amount.

<priority>

Waiting entities will load arriving entities by priority. This expression should be a number between 0 and 999.

Explicit Entity Actions

LOAD does not transfer cost or statistics of the loaded entity. However, if the PERM option is used, the cost of the loading entity does get transferred to the base entity.

Example

In this example, People board (are loaded into) an elevator for .75 minutes or until 12 people get in. The resulting entity is renamed Car_load to show a loaded elevator car. Note that the car will proceed to Loc3 as soon as 12 people are loaded or .75 minutes has elapsed—whichever comes first.

Process Table

Entity...

Location...

Operation (min)...

People

 

Loc1

 

Car

Loc2

LOAD 12 IN .75 min

RENAME AS Car_load

Car_load

Loc2

 

Routing Table

Blk

Output...

Destination...

Rule...

Move Logic...

1

People

Loc2

LOAD 1

Move FOR .05

1

Car_load

Loc3

FIRST 1

MOVE FOR .5 min

See Also

LOAD, GROUP, UNLOAD, ACCUM, COMBINE, JOIN, GROUPQTY(), and ENTITY(). Also see Attributes and the LOAD/UNLOAD Statements.


© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com